package com.apes.auto.car.model;

import com.apes.framework.jpa.DefaultPersistListener;
import com.apes.framework.jpa.Model;
import com.apes.framework.jpa.comment.Comment;
import lombok.Getter;
import lombok.Setter;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.SelectBeforeUpdate;

import javax.persistence.*;

/**
 * @ClassName AutoCategory
 * @Description 车辆类型对照表
 * @Author pengyb
 * @Date 2019/7/11 16:02
 * @Version 1.0
 **/
@Getter
@Setter
@SelectBeforeUpdate
@DynamicInsert
@DynamicUpdate
@Entity
@EntityListeners(DefaultPersistListener.class)
@Table(name = AutoCategory.CONST_TABLE_NAME)
public class AutoCategory extends Model {
    public static final String CONST_TABLE_NAME = "auto_category";
    @Id
    @Column(name = "id", length = 30)
    @Comment("车辆类型编码")
    private String id;  //编码

    @Column(name = "name", length = 32)
    @Comment("车辆类型")
    private String name;// 名称
}
